<!DOCTYPE HTML>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
    <title>屏幕分辨率的高和宽</title>
</head>
<body>
<script type="text/javascript">
    document.write("屏幕宽度：" + screen.width + "px" + "<br>");
    document.write("屏幕高度：" + screen.height + "px" + "<br>");
    document.write("可用宽度：" + screen.availWidth + "px" + "<br>");
    document.write("可用高度：" + screen.availHeight + "px" + "<br>");
    document.write("用户浏览器的颜色位数：" + screen.colorDepth + "<br>");
    document.write("用户浏览器的颜色位数：" + screen.pixelDepth + "<br>");
    //Firefox:24
    //Chrome:24
    //IE:32+undefined
</script>
</body>
</html>